//
//  ManagedWeightLogContext.h
//  WeightLog
//
//  Created by Boky on 5/2/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WeightLog.h"

@interface ManagedWeightLogContext : NSObject <NSFetchedResultsControllerDelegate>{

	NSFetchedResultsController *fetchedResultsController;
    NSManagedObjectModel *managedObjectModel;
    NSManagedObjectContext *managedObjectContext;	    
    NSPersistentStoreCoordinator *persistentStoreCoordinator;	
	
}

@property (nonatomic, retain) NSFetchedResultsController *fetchedResultsController;
@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (WeightLog*)insertNewWeightLog: (NSDate*)aDate value: (NSNumber*)aValue;
-(void)save;
-(NSArray *)sections;
- (NSString *)applicationDocumentsDirectory;

@end
